package com.geekbang.lul.consumer.mapper;

import com.geekbang.lul.dto.CustomerDTO;
import org.apache.ibatis.annotations.Select;

/**
 * @author nhsoft.lul
 */
public interface CustomerMapper {

    /**
     * 余额更新
     * @return
     */
    @Select("update customer set cnh_balance = #{cnhBalance}, usd_balance = #{usdBalance} where customer_id = #{customerId}")
    void updateBalance(CustomerDTO customerDTO);

    @Select("select * from customer where customer_id = #{customerId}")
    CustomerDTO read(Integer customerId);
}
